package com.entrogy.service;

import com.entrogy.bean.AddRoleEntity;
import com.entrogy.bean.PermissionAndMenu;
import com.entrogy.bean.Role;
import com.entrogy.bean.UpdateRoleEntity;

import java.util.List;

public interface RoleService {

    List<Role> findRoles(String roleName,int schoolCode);

    int updateRoles(List<UpdateRoleEntity> updateRoles);

    int discardRoleByIds(List<Integer> deleteRoleIds);

    int enableRoleByIds(List<Integer> enableRoleIds);

    List<Role> findAllRolesSimple(Integer schoolCode);

    boolean addRole(AddRoleEntity addRole);

    List<PermissionAndMenu> findAllPermission(int schoolCode);

    /**
     *  查询管理员获得的所有角色
     * @return
     */
    List<Role> selectAllRoles();

    List<Role> findRolesByUsername(String username);

    Role findRoleByRoleId(Integer roleId);

    List<Integer> listHasSomePermissionRole(String permissionCode, Integer schoolCode);
}
